home *** CD-ROM | disk | FTP | other *** search
- package asp.wizard;
-
- import asp.netobjects.nfx.wizard.WizardPageView;
- import com.sun.java.swing.ListModel;
- import com.sun.java.swing.table.DefaultTableModel;
- import com.sun.java.swing.table.TableColumnModel;
- import com.sun.java.swing.table.TableModel;
-
- public class WizardViewDbList1 extends WizardViewAbstract {
- public static final int COLFIELDNAME = 0;
- public static final int COLFIELDLABEL = 1;
- private static WizardViewAbstract _instance = null;
- private WVPanelDbListFields _mainPanel;
-
- public static WizardViewAbstract getInstance() {
- if (_instance == null) {
- _instance = new WizardViewDbList1();
- }
-
- return _instance;
- }
-
- protected void createMainPanel() {
- this._mainPanel = new WVPanelDbListFields();
- this._mainPanel._btnPreview.addActionListener(new 1(this));
- }
-
- public WVPanelBase getMainPanel() {
- return this._mainPanel;
- }
-
- public TableModel getFieldSpecTableModel() {
- return this._mainPanel.getFieldSpecTable().getModel();
- }
-
- public ListModel getFieldListModel() {
- return this._mainPanel.getFieldList().getModel();
- }
-
- public TableModel getPreviewTableModel() {
- return this._mainPanel._tblPreview.getModel();
- }
-
- private void updatePreview() {
- WizardModelDbList1 model = (WizardModelDbList1)((WizardPageView)this).getModel();
- model.updatePreview();
- }
-
- public boolean getRowHasHyperlink() {
- return this._mainPanel._ckbRowHasHyperlink.getModel().isSelected();
- }
-
- public void setRowHasHyperlink(boolean value) {
- this._mainPanel._ckbRowHasHyperlink.getModel().setSelected(value);
- }
-
- public void clearPreview() {
- DefaultTableModel tmPreview = (DefaultTableModel)this.getPreviewTableModel();
- tmPreview.setNumRows(0);
- TableColumnModel tcm = this._mainPanel._tblPreview.getColumnModel();
-
- for(int i = tcm.getColumnCount() - 1; i >= 0; --i) {
- tcm.removeColumn(tcm.getColumn(i));
- }
-
- }
-
- public void commit() {
- this._mainPanel._l2tPickFields.commitChanges();
- }
-
- // $FF: synthetic method
- static void access$0(WizardViewDbList1 $0) {
- $0.updatePreview();
- }
- }
-